package com.xinyue.game.service.framwork;

import org.springframework.context.ApplicationContext;

import com.xinyue.game.service.framwork.mapping.GameHandlerMappingManager;
import com.xinyue.game.service.framwork.receiver.RocketMQConsumerService;

/**
 * @author 王广帅
 * @since 2023/7/12 20:37
 **/
public class GameServiceApplication {

    public static void run(ApplicationContext context, String serverTopic) {
        RocketMQConsumerService rocketMQConsumerService = context.getBean(RocketMQConsumerService.class);
        GameHandlerMappingManager.getInstance().scanGameHandler(context);
        rocketMQConsumerService.startRocketMQConsumer(serverTopic);
    }
}
